/* Morph Button: Default Styles */

.morph-button {
    position: relative;
    display: block;
    float: right;
    margin-right: 20px;
}

.morph-button > button {
    width: 130px;
    height: 30px;
    position: relative;
    border: none;
    background-color: #e85657;
    color: #f9f6e5;
    letter-spacing: 1px;
    font-weight: 700;
    line-height: 30px;
    font-size: 12px;
}

#btn {
    width: 100%;
    position: relative;
    border: none;
    background-color: #e85657;
    color: #f9f6e5;
    letter-spacing: 1px;
    font-weight: 700;
    line-height: 30px;
    font-size: 16px;
    margin: 10px auto;
}

.morph-button.open > button {
    pointer-events: none;
}

.morph-content {
    pointer-events: none;
}

.morph-button.open .morph-content {
    pointer-events: auto;
}

/* Common styles for overlay and modal type (fixed morph) */
.morph-button-fixed,
.morph-button-fixed .morph-content {
    width: 200px;
    height: 30px;
}

.morph-button-fixed > button {
    -webkit-transition: opacity 0.1s 0.5s;
    transition: opacity 0.1s 0.5s;
}

.morph-button-fixed.open > button {
    opacity: 0;
    -webkit-transition: opacity 0.1s;
    transition: opacity 0.1s;
}

.morph-button-fixed .morph-content {
    position: fixed;
    z-index: 900;
    opacity: 0;
    -webkit-transition: opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
    transition: opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
}

.morph-button-fixed.open .morph-content {
    opacity: 1;
}

.morph-button-fixed .morph-content > div {
    visibility: hidden;
    height: 0;
    opacity: 0;
    -webkit-transition: opacity 0.1s, visibility 0s 0.1s, height 0s 0.1s;
    transition: opacity 0.1s, visibility 0s 0.1s, height 0s 0.1s;
}

.morph-button-fixed.open .morph-content > div {
    visibility: visible;
    height: auto;
    opacity: 1;
    -webkit-transition: opacity 0.3s 0.5s;
    transition: opacity 0.3s 0.5s;
}

.morph-button-fixed.active .morph-content {
    z-index: 1900;
}

/* Morph Button Style: Overlay */
.morph-button.morph-button-overlay {
    margin: 50px auto;
}

/* Morph Button Style: Modal */
.morph-button-modal::before {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 800;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    content: '';
    opacity: 0;
    -webkit-transition: opacity 0.5s;
    transition: opacity 0.5s;
    pointer-events: none;
}

.morph-button-modal.open::before {
    opacity: 1;
    pointer-events: auto;
}

.morph-button-modal.active::before {
    z-index: 1800;
}

.morph-button-modal .morph-content {
    overflow: hidden;
    -webkit-transition: opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
    transition: opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
}

.morph-button-modal.open .morph-content {
    top: 50% !important;
    left: 50% !important;
    margin: -210px 0 0 -300px;
    width: 600px;
    height: 420px;
    -webkit-transition: width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
    transition: width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s;
}

/* Colors and sizes for individual modals */
.morph-button.morph-button-modal-1 {
    float: left;
}

.morph-button.morph-button-modal-2,
.morph-button.morph-button-modal-3 {
    display: inline-block;
    margin: 0px 15px;
}

.morph-button-modal-1 > button,
.morph-button-modal-1 .morph-content {
    background-color: #553445;
}

.morph-button-modal-3 > button,
.morph-button-modal-3 .morph-content {
    background-color: #fef0e3;
    color: #e75854;
}

.morph-button-modal-3.open .morph-content {
    margin: -255px 0 0 -210px;
    width: 420px;
    height: 480px;
}

.morph-button-modal-3.open .morph-content > div {
    height: 420px;
}

.morph-button-modal-3.open .morph-content > div {
    -webkit-transition: opacity 0.3s 0.3s;
    transition: opacity 0.3s 0.3s;
}

/* Let's add some nice easing for all cases */
.morph-button .morph-content,
.morph-button.open .morph-content,
.morph-button-modal-4 .morph-clone {
    -webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
    transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}

/* Helper classes */
.noscroll {
    overflow: hidden;
}

.no-js .morph-button {
    margin: 10px 0;
    float: none;
}

.no-js .morph-button,
.no-js .morph-button .morph-content,
.no-js .morph-button .morph-content > div {
    position: relative;
    width: auto;
    height: auto;
    opacity: 1;
    visibility: visible;
    top: auto;
    left: auto;
    -webkit-transform: none;
    transform: none;
    pointer-events: auto;
}

.no-js .morph-button .morph-content .icon-close {
    display: none;
}

@media screen and (max-width: 600px) {
    .morph-button-modal.open .morph-content {
        top: 0% !important;
        left: 0% !important;
        margin: 0;
        width: 100%;
        height: 100%;
        overflow-y: scroll;
        -webkit-transition: width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s;
        transition: width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s;
    }
}

@media screen and (max-width: 400px) {
    .morph-button-fixed,
    .morph-button-fixed .morph-content {
        width: 200px;
        height: 80px;
    }

    .morph-button-inflow .morph-content .morph-clone {
        font-size: 0.9em;
    }

    .morph-button-modal-4,
    .morph-button-modal-4 .morph-content {
        width: 220px;
        height: 120px;
    }

    .morph-button-modal-4 > button span {
        display: block;
    }

    .morph-button-modal-4 .morph-clone {
        right: 83px;
        bottom: 26px;
    }

    .morph-button-sidebar,
    .morph-button-sidebar .morph-content {
        width: 100% !important;
        height: 60px !important;
    }

    .morph-button-sidebar {
        bottom: 0px;
        left: 0px;
    }

    .morph-button-sidebar.open .morph-content {
        height: 100% !important;
    }
}